package lancs.mobilemedia.core.ui.controller.commands;

import lancs.mobilemedia.core.ui.controller.AbstractController;
import lancs.mobilemedia.core.ui.controller.ControllerCommand;
import lancs.mobilemedia.core.ui.controller.PhotoController;

public class SavePhotoLabel implements ControllerCommand {

	public boolean execute(AbstractController controller) {
		System.out.println("<* PhotoController.handleCommand() *> Save Photo Label = "
				+ ((PhotoController) controller).getScreen().getLabelName());
		((PhotoController) controller).getImage().setImageLabel(
				((PhotoController) controller).getScreen().getLabelName());
		((PhotoController) controller).updateImage(((PhotoController) controller).getImage());
		return ((PhotoController) controller).goToPreviousScreen();
	}
}
